Skip to main content

Import Glass Catalogue file

This will import catalogue of Glass job items with costs for a given customer and supplier.

NOTE:

Max allowed file size is 1.1Mb.

Fields

Field NameDescriptionDatatypeValidationMax lengthMandatoryExample
Supplieraccount Id/group IdstringValid stringUnlimitedYesALRbwQqIVhr0wBjWu0Wp
ProductType of catalogue (reference only, not used by the import)NANANANAGlass
Vehicle IdentifierUnique Id for a vehicle Make & ModelstringHyphens, plus signs, letters, digits, underscores and spaces onlyUnlimitedNo75920321
Repair Type IDARGIC codestringHyphens, plus signs, letters, digits, underscores and spaces onlyUnlimitedYesARGICCODE1
Repair DescriptionBrief description of the job itemstringHyphens, plus signs, letters, digits, underscores and spaces onlyUnlimitedYesWind Screen
MakeVehicle MakestringHyphens, plus signs, letters, digits, underscores and spaces onlyUnlimitedYesAudi
ModelVehicle ModelstringValid string. Saved as default when emptyUnlimitedNoA4
Vehicle TypeVehicle type the price applies tostringCase-insensitive, one of: Car, LCV, Van, Commercial (under 3.5), Commercial (over 3.5), HGV, Motor Bike, Electric Car. Saved as default when emptyNANoCar
Net CostCostdecimalValid numberNAYes356.08
Uplift CostUplifted costdecimalUp to 5 digits with up to 2 decimal places. Must not be lower than Net CostNANo400.00
Customer Account NumberCustomer account the price applies tostringLetters, digits and underscores only. Saved as default when emptyUnlimitedNoACC_45829

Combination of Make, Model, Repair Type ID, Vehicle Identifier, Vehicle Type and Customer Account Number must be unique. These fields, in that order, generate the document id; empty fields become default. For example Audi, A4, ARGICCODE1, 75920321, Car and ACC_45829 generates audi-a4-argiccode1-75920321-car-acc_45829; with Model, Vehicle Type and Customer Account Number empty it generates audi-default-argiccode1-75920321-default-default

Importing a file

Preparation

  1. Create a new branch with Jira task number in the branch name
  2. Delete all the files in importFiles folder
  3. Create a folder with the current sprint number
  4. Copy the file that needs to be imported
  5. Go to package.json , find the line validate:glassPriceCatalogue
  6. Modify --leaseId with the required lease Id
  7. Modify --file with the relative path of the file
  8. Save package.json

Validating locally

  1. in a terminal run npm run validate:glassPriceCatalogue
  2. If there are no errors, push the code

Validating in workflow

  1. Go to Action of Import-manger
  2. Find <Environment> - on-demand-import
  3. Select the branch that was created for this import
  4. Enter script name as validate:glassPriceCatalogue
  5. Leave Overrides empty

Importing the file

  1. If the validation has passed
  2. Go to Action of Import-manger
  3. Find <Environment> - on-demand-import
  4. Select the branch that was created for this import
  5. Enter script name as validate:glassPriceCatalogue
  6. Enter --persist in Overrides field

Testing

  1. A folder will be created (if not already exists) in Firestore, under the /accounts/<accountId from the import file>/cataloguePrice/<lease Id from package.json>/glass
  2. New documents will be added in Typesense > glassCatalogueIndex
Status: Draft
Category: Protected
Authored By: Meet Shah on Sep 16, 2026
Revisions.